/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package REA.util;

import REA.*;

import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;

import org.eclipse.emf.ecore.util.Switch;

/**
 * <!-- begin-user-doc -->
 * The <b>Switch</b> for the model's inheritance hierarchy.
 * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
 * to invoke the <code>caseXXX</code> method for each class of the model,
 * starting with the actual class of the object
 * and proceeding up the inheritance hierarchy
 * until a non-null result is returned,
 * which is the result of the switch.
 * <!-- end-user-doc -->
 * @see REA.REAPackage
 * @generated
 */
public class REASwitch<T> extends Switch<T> {
	/**
	 * The cached model package
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected static REAPackage modelPackage;

	/**
	 * Creates an instance of the switch.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public REASwitch() {
		if (modelPackage == null) {
			modelPackage = REAPackage.eINSTANCE;
		}
	}

	/**
	 * Checks whether this is a switch for the given package.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @parameter ePackage the package in question.
	 * @return whether this is a switch for the given package.
	 * @generated
	 */
	@Override
	protected boolean isSwitchFor(EPackage ePackage) {
		return ePackage == modelPackage;
	}

	/**
	 * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @return the first non-null result returned by a <code>caseXXX</code> call.
	 * @generated
	 */
	@Override
	protected T doSwitch(int classifierID, EObject theEObject) {
		switch (classifierID) {
			case REAPackage.ECONOMIC_RESOURCE: {
				EconomicResource economicResource = (EconomicResource)theEObject;
				T result = caseEconomicResource(economicResource);
				if (result == null) result = caseREAOperationalEntity(economicResource);
				if (result == null) result = caseREAelement(economicResource);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.ECONOMIC_EVENT: {
				EconomicEvent economicEvent = (EconomicEvent)theEObject;
				T result = caseEconomicEvent(economicEvent);
				if (result == null) result = caseREAOperationalEntity(economicEvent);
				if (result == null) result = caseREAelement(economicEvent);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.ECONOMIC_AGENT: {
				EconomicAgent economicAgent = (EconomicAgent)theEObject;
				T result = caseEconomicAgent(economicAgent);
				if (result == null) result = caseREAOperationalEntity(economicAgent);
				if (result == null) result = caseREAelement(economicAgent);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.STOCKFLOW: {
				stockflow stockflow = (stockflow)theEObject;
				T result = casestockflow(stockflow);
				if (result == null) result = caseREARelations(stockflow);
				if (result == null) result = caseREAelement(stockflow);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.PARTICIPATION: {
				participation participation = (participation)theEObject;
				T result = caseparticipation(participation);
				if (result == null) result = caseREARelations(participation);
				if (result == null) result = caseREAelement(participation);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.REA_OPERATIONAL_ENTITY: {
				REAOperationalEntity reaOperationalEntity = (REAOperationalEntity)theEObject;
				T result = caseREAOperationalEntity(reaOperationalEntity);
				if (result == null) result = caseREAelement(reaOperationalEntity);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.COMMITMENT: {
				Commitment commitment = (Commitment)theEObject;
				T result = caseCommitment(commitment);
				if (result == null) result = caseREAOperationalEntity(commitment);
				if (result == null) result = caseREAelement(commitment);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.FULFILLMENT: {
				fulfillment fulfillment = (fulfillment)theEObject;
				T result = casefulfillment(fulfillment);
				if (result == null) result = caseREARelations(fulfillment);
				if (result == null) result = caseREAelement(fulfillment);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.REA_RELATIONS: {
				REARelations reaRelations = (REARelations)theEObject;
				T result = caseREARelations(reaRelations);
				if (result == null) result = caseREAelement(reaRelations);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.DUALITY: {
				duality duality = (duality)theEObject;
				T result = caseduality(duality);
				if (result == null) result = caseREARelations(duality);
				if (result == null) result = caseREAelement(duality);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.REA_ATTRIBUTE: {
				REAAttribute reaAttribute = (REAAttribute)theEObject;
				T result = caseREAAttribute(reaAttribute);
				if (result == null) result = caseREAelement(reaAttribute);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.REA_POLICY_RELATION: {
				REAPolicyRelation reaPolicyRelation = (REAPolicyRelation)theEObject;
				T result = caseREAPolicyRelation(reaPolicyRelation);
				if (result == null) result = caseREAelement(reaPolicyRelation);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.REA_POLICY_ENTITY: {
				REAPolicyEntity reaPolicyEntity = (REAPolicyEntity)theEObject;
				T result = caseREAPolicyEntity(reaPolicyEntity);
				if (result == null) result = caseREAelement(reaPolicyEntity);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.RE_AMODEL: {
				REAmodel reAmodel = (REAmodel)theEObject;
				T result = caseREAmodel(reAmodel);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			case REAPackage.RE_AELEMENT: {
				REAelement reAelement = (REAelement)theEObject;
				T result = caseREAelement(reAelement);
				if (result == null) result = defaultCase(theEObject);
				return result;
			}
			default: return defaultCase(theEObject);
		}
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Economic Resource</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Economic Resource</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseEconomicResource(EconomicResource object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Economic Event</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Economic Event</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseEconomicEvent(EconomicEvent object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Economic Agent</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Economic Agent</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseEconomicAgent(EconomicAgent object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>stockflow</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>stockflow</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T casestockflow(stockflow object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>participation</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>participation</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseparticipation(participation object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Operational Entity</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Operational Entity</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseREAOperationalEntity(REAOperationalEntity object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Commitment</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Commitment</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseCommitment(Commitment object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>fulfillment</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>fulfillment</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T casefulfillment(fulfillment object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Relations</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Relations</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseREARelations(REARelations object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>duality</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>duality</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseduality(duality object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Attribute</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Attribute</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseREAAttribute(REAAttribute object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Policy Relation</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Policy Relation</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseREAPolicyRelation(REAPolicyRelation object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>Policy Entity</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>Policy Entity</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseREAPolicyEntity(REAPolicyEntity object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>RE Amodel</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>RE Amodel</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseREAmodel(REAmodel object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>RE Aelement</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>RE Aelement</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
	 * @generated
	 */
	public T caseREAelement(REAelement object) {
		return null;
	}

	/**
	 * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * <!-- begin-user-doc -->
	 * This implementation returns null;
	 * returning a non-null result will terminate the switch, but this is the last case anyway.
	 * <!-- end-user-doc -->
	 * @param object the target of the switch.
	 * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
	 * @see #doSwitch(org.eclipse.emf.ecore.EObject)
	 * @generated
	 */
	@Override
	public T defaultCase(EObject object) {
		return null;
	}

} //REASwitch
